// 登录相关接口
import https from "../request.js";

let apiCash = {};
// 获取token
apiCash.getTokenInfo = (data) => {
  return https.get("/weilai/get-token",data);
};
// 获取现金券列表
apiCash.getCashList = (data) => {
  return https.get("/cash-coupon/get-list-by-user-id", data);
};
// 获取兑换列表(兑换信息)
apiCash.getExchangeList = (data) => {
  return https.get("/weilai/get-exchange-list-by-user-id", data);
};

// 获取用户列表
apiCash.getUserList = (data) => {
  return https.get("/weilai/get-user-list", data);
};

// 兑换现金
apiCash.exchangeCash = (data) => {
  return https.post("/weilai/exchange-coin", data);
};
// 兑换洗衣券
apiCash.exchangeCoupon = (data) => {
  return https.post("/weilai/exchange-coupon", data);
};
//  激活
apiCash.cashCoupunActivate = (data) => {
  return https.post("/cash-coupon/activate", data);
};
//  获取可用现金券
apiCash.getCashCount = (data) => {
  return https.get("/cash-coupon/get-count", data);
};

//  获取用户所有优惠券
apiCash.getAllCouponList = (data) => {
  return https.get("/user-box-coupon/get-list-by-user-id", data);
};
//  查询可折换的现金券
apiCash.getExchangeableCashCoupon= (data) => {
  return https.get("/user-box/get-exchangeable-cash-coupon", data);
};
//  折换现金券
apiCash.exchangeUserBoxPrize= (data) => {
  return https.post("/user-box/exchange-prize", data);
};
export default apiCash;
